<?php
	namespace App\Middleware;
	class AuthMiddleware extends BaseMiddleware{
		public function __invoke($request,$response,$next){
	     if($_SESSION['UserEmail']==""){
                return $response->withRedirect($this->container->router->pathFor('login'));
            }
			$response=$next($request,$response);
			return $response;
		  }
	}
